package UserUI;

import loginUI.LoginFrame;
import userManageUI.ChangePassWordFrame;
import userManageUI.StudentInfoFrame;
import courseManageUI.CourseInfoFrame;
import courseManageUI.ReleaseCourseFrame;
import frameUI.ModifyFrame;
import frameUI.ShowFrame;
import VO.UserVO;

public class DepAdmController {

	private static UserVO userVO;
	private static DepAdminFrame depAdminFrame;
	private static ModifyFrame modifyFrame;
	private static ReleaseCourseFrame releaseCourseFrame;
	private static StudentInfoFrame studentInfoFrame;
	private static ChangePassWordFrame changePassWordFrame;
	private static ShowFrame showFrame;
	private static CourseInfoFrame courseInfoFrame;
	public DepAdmController(UserVO userVO){
		this.userVO = userVO;
		depAdminFrame = new DepAdminFrame(this.userVO);
		modifyFrame = new ModifyFrame(this.userVO,false);
		releaseCourseFrame = new ReleaseCourseFrame(this.userVO);
		studentInfoFrame = new StudentInfoFrame(this.userVO,false);
		changePassWordFrame = new ChangePassWordFrame(this.userVO);
//		showFrame = new ShowFrame(userVO, false, null);
	}
	public DepAdmController(){
		
	}
	
	public static void jumpTo(String frame){
		switch(frame){
		case"login":
			new LoginFrame().setVisible(true);break;
		case"main":
			depAdminFrame.setVisible(true);break;
		case"modifyFrame":
			modifyFrame.setVisible(true);break;
		case"releaseCourseFrame":
			releaseCourseFrame.setVisible(true);break;
		case"studentInfoFrame":
			studentInfoFrame.setVisible(true);break;
		case"changePassWordFrame":
			changePassWordFrame.setVisible(true);break;
	//	case"showFrame":
	//		showFrame.setVisible(true);break;
		case"courseInfoFrame":
			courseInfoFrame.setVisible(true);break;
		}
	}
}
